package org.jeecg.modules.bigscreen.controller;


import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.modules.bigscreen.service.BigWaterScreenService;
import org.jeecg.modules.water.service.ILwgyJointWaterConfigurationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;



/**
 * @Description: 数据大屏
 * @Author: sn
 * @Date:   2024-05-18
 * @Version: V1.0
 */
@Api(tags="数据大屏接口-水控")
@RestController
@RequestMapping("/bigwaterscreen")
@Slf4j
public class BigWaterScreenController {

	@Autowired
	private BigWaterScreenService bigWaterScreenService;




	/**
	 * 水控大屏-获取房间数量，水表，电表数量等
	 *
	 * @return
	 */
	@AutoLog(value = "水控大屏-数量信息")
	@ApiOperation(value="水控大屏-数量信息", notes="水控大屏-数量信息")
	@GetMapping(value = "/queryData")
	public Result<?> queryHotelData() {

		try {
			return Result.OK(bigWaterScreenService.getData());
		}
		catch(Exception error){
			log.error(error.getMessage(), error);
			return Result.error("获取住宿数据失败:"+error.getMessage());
		}

	}





}
